// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import Vuex from 'vuex'
import VueQuillEditor from 'vue-quill-editor'
import store from './store/index.js'
import 'swiper/dist/css/swiper.css'
import 'style/animate.css'
import 'style/border.css'
import 'style/nomalize.css'
import 'style/iconfont.css'
import axios from 'axios'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
axios.defaults.withCredentials = true
Vue.prototype.axiso = axios
Vue.prototype.clearSpace = (val) => {
  return val.replace(/^\s+/g, '').replace(/\s+$/g, '')
}
Vue.prototype.get = (url, headers) => {
  return axios.get(url, {headers})
}
Vue.prototype.put = (url, data, headers) => {
  return axios.put(url, data, {headers})
}
Vue.prototype.post = (url, data, headers) => {
  return axios.post(url, data, {headers})
}
Vue.config.productionTip = false
Vue.use(VueQuillEditor)
Vue.use(VueAwesomeSwiper)
Vue.use(Vuex)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
